-- GET_SPECIAL_MONSTER_DESC

-- 获取特殊的怪物特性描述
-- @param monster   怪物对象
-- @param propId    特性对应的propId
return function(monster, propId, desc)
    local props = PropM.fetchProps(monster, propId);
    local _props, prop, value;

    for index = 1, #props do
        -- 需要替换的数值
        prop = props[index];
        value = prop[3];
        if 207 == prop[1] and "attack" == prop[2] then
            -- 物理抗性，需要计算降低抗性类的影响
            -- 开板降低物抗
            _props = PropM.fetchProps(monster, "open_grid_reduce");
            for _, p in ipairs(_props) do
                if p[2] == "attack_resist" then
                    value = PropM.trigger(monster, p[1], p[2], value);
                end
            end

            -- 阵亡同伴数量降低物抗
            _props = PropM.fetchProps(monster, "weak");
            for _, p in ipairs(_props) do
                if p[2] == "attack_resist" then
                    value = PropM.trigger(monster, p[1], p[2], value);
                end
            end
        end

        if PropM.query(prop[1], "type") == PROP_TYPE_RATIO then
            value = value / 10;
        end

        desc = string.gsub(desc, "{value}", value, 1);
    end

    return desc;
end